<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <title>{{ tsettings.site_name }}</title>
         {{ tsettings.header }}
        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />

<script type="text/javascript">
function toggleLayer( whichLayer )
{
  var elem, vis;
  if( document.getElementById ) // this is the way the standards work
    elem = document.getElementById( whichLayer );
  else if( document.all ) // this is the way old msie versions work
      elem = document.all[whichLayer];
  else if( document.layers ) // this is the way nn4 works
    elem = document.layers[whichLayer];
  vis = elem.style;
  // if the style.display value is blank we try to figure it out here
  if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
    vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
  vis.display = (vis.display==''||vis.display=='block')?'none':'block';
}

function pagerefresh(){
    window.location = window.location
}
{% if pagerefresh %}
   var refreshcounter={{ pagerefresh.timeout }}
{% else %}
   var refreshcounter="disabled";
{% endif %}
var refreshtimer;

function refreshcountdown(){
   if (refreshcounter <= 0){
       pagerefresh();
   }else if(refreshcounter != "disabled"){
       refreshcounter--;
       refreshtimer = setTimeout('refreshcountdown()',1000);
   }
//   document.getElementById("counterplaceholder").value = refreshcounter;
}

</script>

    </head>
    <body onLoad="refreshcountdown()">

        <div id="header">
            <h1><a href="{% url hakaze.forums.views.channellist %}">{{ tsettings.site_name }}</a></h1>
            <h2>{{ tsettings.site_slogan }}</h2>
        </div>

        <div id="menu">
            <ul>
	<li><a href="{% url hakaze.forums.views.channellist %}">{{ tsettings.site_index_title }}</a></li>
        <li><a href="{% url hakaze.wiki.views.wikipage %}">Wiki</a></li>
        {% if user.is_staff %}
<li><a href="{% url hakaze.forums.views.adminview %}">Staff CP</a> </li>
        {% endif %}
        {% if user.is_authenticated %}
     <li><a href="{% url hakaze.forums.views.logoutview %}">Logout</a></li>
        {% else %}
<li><a href="{% url hakaze.forums.views.loginview %}">Staff Login</a> </li>
        {% endif %}
      <li><a href="{% url hakaze.wiki.views.wikipage "Disclaimer" %}">Disclaimer</a></li>
      <li><a href="{% url hakaze.wiki.views.wikipage "Help" %}">Help</a></li>
            </ul>
        </div>


        <div id="content">
{{ tsettings.globalmessage }}<br/><br/>
<hr/>
<br/>

{% if categories %}
<form method="get" action="{% url hakaze.utils.views.redirector %}">
Jump To : 
<select name="urlredir">
<option value="{% url hakaze.forums.views.channellist %}">{{ tsettings.site_index_title }}</option>
{% for c in categories %}
  {% for n in c.channel_set.all %}
  <option value="{% url hakaze.forums.views.channelview n.codename %}">{{ c.name }} &gt; {{ n.name }}</option>
  {% endfor %}
{% endfor %}
</select>
<input type="submit" value="Go"><br/><br/>
</form>
{% endif %}

<br/>
<br/>
{% if notice_messages %}
<blockquote style="text-align:center">
    <span style="font-weight:bold">
   {% for notice in notice_messages %}
      {{ notice }}<br/>
   {% endfor %}
   </span>
</blockquote>
{% endif %}
{% block contents %}
{% endblock contents %}       
       </div>

        <div id="footer">

{% if footeritems %}
   {% for div in footeritems %}
      <div class="link-group">
          <h3>{{ div.title }}</h3>
          <ul>
            {% for item in div.items %}
               <li><a href="{{ item|first }}">{{ item|slice:"1:2"|first }}<a></li>
            {% endfor %}
          </ul>
      </div>
   {% endfor %}
{% endif %}


          <div id="credits">
          {{ tsettings.credits }}<br/>
                design by <a href="http://brandoncwood.com">Brandon Wood</a>
            </div>

        </div>

    </body>
</html>
